home *** CD-ROM | disk | FTP | other *** search
/ Merciful 1 / Merciful - Disc 1.iso / software / a / amiga_vision_professional / amigavisionprofessiv2.04a.dms / in.adf / AV_Help / Control.english < prev    next >
Encoding:
Text File  |  1992-12-01  |  8.7 KB  |  102 lines

  1. |01 Call
  2.  
  3. The |BCall|B icon references a subroutine. A subroutine refers to an independent segment of the flow that represents a procedure that is repeatedly used in an application.
  4.  
  5. When you place the |BCall|B icon in the outline, a |Iplaceholder|I for the partner automatically appears. Double-click on the placeholder to begin the referencing process. This process allows you to scroll through the flow window and select the specific |BSubroutine|B icon to be referenced.
  6.  
  7. During presentation, when the execution of an application reaches the |BCall|B icon, the referenced subroutine is executed. If either a |BReturn|B icon is encountered within a subroutine or if the subroutine execution is completed, the application will continue with the icon following the |BCall|B icon in the flow outline.
  8.  
  9. |02 Conditional Goto
  10.  
  11. The |BConditional Goto|B icon branches to an icon in another part of the outline based on a specified condition. This icon conditionally transfers the flow of logic from one part of the application to another.
  12.  
  13. You define the condition for the branching using the |BExpression Editor|B. An expression is a simple test that returns either a true or false value. If the result is true, the |BGoto|B is performed, otherwise it is not.
  14.  
  15. When you place the |BConditional Goto|B icon in the outline, a |Iplaceholder|I for the partner automatically appears. Double-click on the placeholder to begin the referencing process. You can now scroll through the flow window and select the specific icon for referencing.
  16.  
  17. Note the following restrictions on the use of the |BConditional Goto|B icon:
  18.  
  19. 1.  You can only reference icons which are on the same level (or vertical column in the flow) or to the left of the icon. But you may not use |BConditional Goto|B icons to branch to any icons to the right of it in the flow.
  20.  
  21. 2.  The Flow Editor will not permit you to branch to an icon that is a child of a |BLoop|B, |BSubroutine|B, |BSelect Record|B, or |BInterrupt|B icon. However, you can branch to a |Iparent|I |BLoop|B, |BInterrupt|B, or |BSelect Record|B icon.
  22.  
  23. 3.  The |BConditional Goto|B icon cannot reference itself.
  24.  
  25. During presentation, if the specified condition is |Itrue|I, the application branches to the referenced icon and continues from that point. If the condition is |Ifalse|I, the icon following the |BConditional Goto|B icon is executed.
  26.  
  27. The |BConditional Goto|B icon offers a powerful way of creating branching in flow. But be careful while using it, as you may unintentionally create an infinite loop.
  28.  
  29.  
  30. |03 Goto
  31.  
  32. The |BGoto|B icon unconditionally branches or transfers control of flow to an icon in another part of the outline.
  33.  
  34. When you place the |BGoto|B icon in the outline, a |Iplaceholder|I for the partner automatically appears. Double-click on the placeholder which allows you to scroll through the flow window and select the specific icon to be referenced.
  35.  
  36. Note the following restrictions on the use of the |BGoto|B icon:
  37.  
  38. 1.  It can only reference icons which are on the same level (or vertical column in the flow) or to the left of the icon. You cannot use |BGoto|B icons to branch to any icons to the right of it.
  39.  
  40. 2.  The Flow Editor will not permit you to branch to an icon that is a child of a |BLoop|B, |BSubroutine|B, |BSelect Record|B or |BInterrupt|B icon. However, you can branch to a parent |BLoop|B, |BInterrupt|B or |BSelect Record|B icon.
  41.  
  42. 3.  The |BGoto|B icon cannot reference itself.
  43.  
  44. During presentation, when the application reaches the |BGoto|B icon, it unconditionally branches to the referenced icon and continues from that point.
  45.  
  46. Use care, as it is possible to create an unintentional infinite loop with this icon.
  47.  
  48.  
  49. |04 Loop
  50.  
  51. The |BLoop|B icon creates a set of actions to be taken indefinitely, until a certain condition is true or a set number of times. The |BLoop|B icon is important for repeating a set of actions.
  52.  
  53. Clicking on the multistate gadget below the Memo field cycles through the available loop types: |BEndless|B, |BCounted|B and |BConditional|B.
  54.  
  55. An |HEndless|H loop needs no other specifications. It simply runs continuously until interrupted by an interrupt event or a |BLoop Exit|B icon. If an interrupt event occurs, the loop will resume where it was interrupted after the interrupting event is completed. The |BLoop Exit|B icon lets you permanently exit a loop and proceed to the icon following the |BLoop|B icon.
  56.  
  57. A |HCounted|H loop needs three parameters:  numeric values for |HStart|H, |HStep|H, and |HStop|H. These values can either be positive or negative integers or defined by variables. The Counter variable |HVar|H is an option in which you can specify a variable name for use within the loop. The value of the variable will be incremented from the |HStart|H value by increments of |HStep|H. The value of the loop variable can be used in other expressions in the loop.
  58.  
  59. |HStart|H is the initial value of the counter, and |HStop|H is the final value. |IAmigaVision|I performs the actions of all the icons that are part of the |BLoop|B, then adjusts the value of the counter by the amount specified by |HStep|H.
  60.  
  61. You may enter either numeric values or variables to specify |HStart|H, |HStop|H, and |HStep|H by clicking on their respective gadgets.
  62.  
  63. The variable specified for |HVar|H is useful if you wish to evaluate expressions within the loop that change during each cycle of the loop.
  64.  
  65. When a |HConditional|H loop has been selected, the |HTest at Start/Test at End|H gadget becomes active. |HConditional (Test at Start)|H refers to a condition which is checked at the |Ibeginning|I of each loop cycle and which will end the loop if false. |HConditional (Test at End)|H is the same except the condition is checked at the |Iend|I of each loop cycle. The loop continues to execute until the specified condition is no longer true.
  66.  
  67. The expression you create in the |BExpression Editor|B will appear in the text box below the Conditional (Test at) gadget after you exit the editor.
  68.  
  69.  
  70. |05 Loop Exit
  71.  
  72. The |BLoop Exit|B icon is used to cause a loop to end, and the application to continue with the icon following the loop.
  73.  
  74. During presentation, when the application reaches the |BLoop Exit|B icon, the loop is terminated and the action of the Loop's next sibling is performed. The |BLoop Exit|B icon is ignored if it is placed outside of a loop.
  75.  
  76. Another way to exit a loop is to use the |BConditional Goto|B or |BGoto|B icon to branch out of the loop.
  77.  
  78.  
  79. |06 If-Then
  80.  
  81. The |BIf-Then|B icon tests to see if a condition is true, and if it is, performs the actions of its |Hpartner|H icon. The |Hpartner|H icon is placed directly to the right of the |BIf-Then|B icon.
  82.  
  83. You define the condition for the |BIf-Then|B icon using the |BExpression Editor|B. An expression is a simple test that returns either a true or false value. If the result is true, the |Hpartner|H is performed, otherwise it is not.
  84.  
  85. If you would like to place more than one icon as the |Hpartner|H of the |BIf-Then|B icon, place a |BModule|B icon as the |Hpartner|H. If the condition is true, all the child icons of the |BModule|B icon will be performed.
  86.  
  87. You may not place another |Hpartner-dependent|H icon as the |Hpartner|H of an |BIf-Then|B. To execute a |BCall|B, |BGoto|B, |BConditional Goto|B, |BIf-Then|B or |BIf-Then-Else|B icon as the |Hpartner|H of an |BIf-Then|B icon it must be placed as the child of a |BModule|B icon.
  88.  
  89.  
  90. |07 If-Then-Else
  91.  
  92. The |BIf-Then-Else|B icon tests to see if a condition is true, and if it is, performs the actions of its |Hpartner|H icon. If the condition is false, it performs the actions of the icon directly below it. The |Hpartner|H icon is placed directly to the right of the |BIf-Then-Else|B icon.
  93.  
  94. You define the condition for the |BIf-Then-Else|B using the |BExpression Editor|B. An expression is a simple test that returns either a true or false value. If the result is true, the |Hpartner|H is performed, otherwise the icon directly below the |BIf-Then-Else|B is performed.
  95.  
  96. If you would like to place more than one icon as the |Hpartner|H of the |BIf-Then-Else|B icon, place a |BModule|B icon as the |Hpartner|H. If the condition is true, all the child icons of the |BModule|B icon will be performed.
  97.  
  98. You may not place another |Hpartner-dependent|H icon as the |Hpartner|H of an |BIf-Then-Else|B. To execute a |BCall|B, |BGoto|B, |BConditional Goto|B, |BIf-Then|B or |BIf-Then-Else|B icon as the |Hpartner|H of an |BIf-Then-Else|B it must be placed as the child of a |BModule|B icon.
  99.  
  100. You can test multiple conditions by using subsequent |BIf-Then-Else|B icons. If you would like to test for three different possible |Iresponse()|I values you would place the first |BIf-Then-Else|B and set the condition to |Iresponse()=="firstchoice"|I. Directly below it, as the |BElse|B result, place another |BIf-Then-Else|B with a condition of |Iresponse()=="secondchoice"|I. Finally place a simple |BIf-Then|B to test for |Iresponse()=="thirdchoice"|I.
  101.  
  102.